from appium.webdriver.common.appiumby import AppiumBy

from base.base_page import BasePage


class HomePage(BasePage):
    _MENU_BUTTON = (AppiumBy.ACCESSIBILITY_ID,
                    "向上瀏覽")

    def __init__(self, driver):
        super().__init__(driver)

    def click_menu(self):
        self.search_and_click(self._MENU_BUTTON)

        from pages.menu_page import MenuPage
        return MenuPage(self.driver)
